Drop-dead Dropbox Doings with Deliverance
How Deliverance [1] and Dropbox [2] make a perfect pair and can be used to further extend Deliverance's revolutionary design workflow.
How websites were themed before
Almost always Web Designers have to know at least some internals about the templating system if they want to deliver a complete theme, ready to integrate in the particular Content Management System. Often, Web Developers have then to touch the templates again to fit to their and the CMS needs. But most of the time a static HTML template is created by a Web Designer which has to be transformed by a Web Developer to the template language in use.
The only things left to the Web Designer for easy modification are the CSS files. If the Web Designer has no access to the project's development repository, the Web Developer has again to integrate them. In the case of Plone, there is the portal_skins/custom folder which allows theme updates through the web - but all of these cases aren't optimal.
And then there was Deliverance
With Deliverance a revolutionary web design workflow was introduced.
PyPi says: "Deliverance does transformations of HTML to 'theme' pages, similar in function to XSLT but using a simpler XML-based language to express the transformation." [3]
Okay, we could have used XSLT before and besides to the Deliverance development team many kudos also have to go to those XML heads. But i hardly know someone who uses XSLT for theming websites. XSLT alone cant make the design workflow much easier as it is.
With deliverance we create a file where we express transformation rules which define how content-bits from the source HTML (which comes from the CMS system) should replace specific tags or their contents in a target theme (which is the static HTML template) - all in an easily understandable XML syntax. All elements from source and target are selectable via CSS selectors or XPath expressions. The target HTML template should be tagged with id- or class attributes, so that the relevant elements can be easily accessed via CSS selectors.
This allows empowers Web Designers to constantly improve their theme as long as they respect the Deliverance rules which modify their template on the fly.
For more information about writing rules read the Deliverance documentation [4].
Now everything with Dropbox
Dropbox [5] is a commercial file sharing provider which offers 2GB space in the cloud for free. The cool thing with Dropbox is, that it provides a client program which creates a folder in your home directory where local copies of the files from your online Dropbox folder are stored. You can edit those files or create new ones and the changes are immediately pushed to the server - and in the case of a shared folder to all subscribers of that folder. Dropbox also comes with basic versioning support.
The uncool thing with Dropbox is, that the protocol and Dropbox daemon are closed source. The other parts of the Dropbox client are open sourced, at least for Linux.
If the static HTML template is developed in an shared Dropbox folder and integrated into Deliverance via a symlink, all changes to the templates are immediately visible by all developers with that setup - normally within 5 seconds.
And because the need for design changes don't stop with website deployment, this setup can also be used for a live server. All involved parties just have to be aware about the risk of breaking the site if a modified HTML structure interferes with the Dropbox rules. But this allows Web Designers to tweak the design independently of Web developers. And this is cool.
This technique was used for the new website of Grüne Akademie Steiermark [6]. A simmilar setup without Dropbox integration on the server was first used for the Gnome WGO project [7].
Some tips when using Dropbox in your buildout environment
Let's say, the static HTML templates are developed in this folder:
/home/USER/Dropbox/website-template
and Deliverance expects it's template-directory here:
/home/USER/dev/website-buildout/static
To use the Dropbox templates with deliverance, just link the directory like so:
ln -s /home/USER/Dropbox/website-template /home/USER/dev/website-buildout/static
If you don't want to use Dropbox on your live server - for what some heavy reasons can be found - you can check in the files into your favorite Version Control System. Since you may want to check in all the files and not only the symlink, you may have to mount the Dropbox folder instead of linking it:
mount --bind /home/USER/Dropbox/website-template /home/USER/dev/website-buildout/static
Attention: Don't delete your website-buildout directory because this would also delete the Dropbox folder! You have to unmount it before or use the '-o ro' mount option for read only access.
References
- [1] http://www.coactivate.org/projects/deliverance/introduction
- [2] http://en.wikipedia.org/wiki/Dropbox_%28storage_provider%29
- [3] http://pypi.python.org/pypi/Deliverance/
- [4] http://deliverance.openplans.org/
- [5] https://www.dropbox.com
- [6] http://gruene-akademie.at/
- [7] http://svn.plone.org/svn/collective/gnomeweb-plone/
Artikelaktionen
not only for plone
Nitpick
Plone Conference 2009 Budapest (#1)
First short report
BlueDynamics Alliance is at Plone Conference in Budapest! Peter Holzer, Robert Niederreiter and me, Jens Klein. Also Johannes Raggam, our intern from last year is here.
Its good to meet all the people from Plone Community. Amazing how many new people are here!
We are listing to some interesting talks and if theres no we started to sprint on AGX, the framework for tree-transformations which is the base of the new (Code-) Generator.
I prepared a lighting talk on cornerstone.soup, our lightweight isolated conatainer for queryable records - based on ZTKand made for Plone.
Robert prepared a lightning talk about AGX. Johannes will show the outcome of his thesis, a "activity model runtime engine for python" - which uses AGX and the underlying zodict-Node.
Artikelaktionen
GSOC Mentoring #3: Paula grows
Student Florian updated today his road-map and we are at a state to present first Google Summer of Code pre-mid-term results.
Yes! Theres finally code around (http://repo.or.cz/w/paula.core.git
http://repo.or.cz/w/paula.data.git
http://repo.or.cz/w/paula.examples.git
http://repo.or.cz/w/paula.plonepas.git
http://repo.or.cz/w/paula.testing.git).
Florian took a GIT repository and so I learned how to use it. Its simple, on a debian based system do apt-get install git-core and then clone it with git clone git://repo.or.cz/MODULENAME.git
He also published his new roadmap. Together with the paula-concept-paper you can get deeper insights of whats going on.
To summarize: Florian underestimated the complexity of PAS/PlonePAS/membrane and it took him a while to understand the API. So he's a bit behind his schedule. On the other hand he has a good and detailled plan and knows his tasks. So I'am optimistic that he will make it in time. I'll control the schedule and the work done now a bit more.
Florian moved the focus more to two things: Make PAU available in Plone (paula.plonepas) and usage of "content-objects" (some object providing a specific interface) in PAU for auth, properties, group-membership and so on. The LDAP-part is moved out of focus for SoC, but is part of the overall concept. Florian is motivated to continue the project after SoC.
Artikelaktionen
GSOC Mentoring #1: First Meeting
Google Summer of Code 2008: Jens Klein is Mentor of Florian Friesdorf.
Florian is student at TU München. At Google Summer of Code (GSOC) he is doing a project for Plone Foundation.
His topic is "Non-AT membrane, a new plone authentication scheme and ldap".
I'am - Jens Klein - mentor this project. I've experience with PAS and related topics like LDAP. I got in touch with PAS (Pluggable Authentication Service) and PlonePAS (PAS integration in Plone), early at Plone 2.1 times. Not all worked as expected. For our customer Linde Verlag we made it work. We used early Membrane code and built an extension called Memblets for user-properties through content objects. Later, memblets core features were integrated in Membrane.
Florian is located at Munich, I'am at Innsbruck. It's by train a distance of roughly two hours and so I invited Florian to visit us at the BlueDynamics office for a conceptual meeting. This happend on May 16th. The very creative meeting took about four hours and was finalized with a beer at the pub Treibhaus. Robert Niederreiter joined the meeting as well and after several sheets of painted flipchart-paper, discussions about use-cases and architecture Florian got good input for his concept.
Florian will publish his refined concept soon. To anticipate a detail: It's female and her name is Paula.
Artikelaktionen
1
